//
//  WPHTTPSessionManager.h
//  wobingwoyi
//
//  Created by WGP on 16/7/22.
//  Copyright © 2016年 WGP. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol continueToUseWWWADelegate <NSObject>

@required
-(void)continueToUseWWWA;

@end

/**定义请求类型的枚举*/

typedef NS_ENUM(NSUInteger,HttpRequestType)
{
    
    HttpRequestTypeGet = 0,
    HttpRequestTypePost
    
};

/**定义请求成功的block*/
typedef void(^requestSuccess)( NSDictionary * object);

/**定义请求失败的block*/
typedef void(^requestFailure)( NSError *error);

/**定义上传进度block*/
typedef void(^uploadProgress)(float progress);

/**定义下载进度block*/
typedef void(^downloadProgress)(float progress);


@interface WPNetWorkManager : AFHTTPSessionManager


@property(nonatomic,weak)id<continueToUseWWWADelegate> delegate;

//默默的用户登录
- (void)userLogin;
/**
 *  获得单例的方法
 */
+(instancetype)sharedNetWorkManager;

/**
 *  上传多张图片
 *
 *  @param URLStr              URL字符串
 *  @param images              图片数组
 *  @param parameter           上传图片的文件名
 *  @param parameters          请求参数,可选
 *  @param ratio               缩放比例
 *  @param uploadProgressBlock 上传进度
 *  @param succeedBlock        成功回调
 *  @param failedBlock         失败回调
 */
-(void)uploadImagesWithURL:(NSString *)URLStr imagesArr:(NSArray *)images parameterOfimages:(NSString *)parameter  parametersDict:(NSDictionary *)parameters compressionRatio:(float)ratio  uploadProgressBlock:(uploadProgress)uploadProgressBlock succeedBlock:(requestSuccess)succeedBlock failedBlock:(requestFailure)failedBlock;

/**
 *  开始网络状态监测
 */
-(void)startMonitoring;

@end
